import store from '@/store'
export const rule = {
  cardOrder(rule, value, callback) {
    if (value != '') {
      if (value.indexOf(" ") == -1) {
        callback()
      } else {
        callback(new Error('卡号不能有空格!'))
      }
    }
  }
}
export const tableOption = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  "viewBtn": true,
  "addBtn": false,
  editBtn: false,
  delBtn: false,
  "selection": true,
  // selectable: row => {
  //   return row.invalidTicketStatus == '0'||row.invalidTicketStatus == null
  // },
  labelWidth: 120,
  searchMenuSpan: 6,
  height: 450,
  "column": [
	  {
      "type": "input",
      "label": "唯一标识",
      "prop": "id",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "线路编码",
      "prop": "lineCode",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "车站编码",
      "prop": "stationCode",
      "hide": true,
      "display": false
    },	  {
      "type": "select",
      "label": "操作类型",
      "prop": "operationType",
      "dicUrl": '/admin/dict/type/work_ticket_operation_type',
      "display": false,
      search: true
    },	  {
      "type": "select",
      "label": "办理类型",
      "prop": "handleType",
      "dicUrl": '/admin/dict/type/work_ticket_handle_type',
      disabled: true
      // rules: [{
      //   required: true,
      //   message: '请选择办理类型',
      //   trigger:"blur"
      // }],
      //disabled: true
    },	  {
      width:120,
      "type": "input",
      "label": "旧卡号/订单号",
      "prop": "cardOrder",
      "search": true,
	  searchLabelWidth:"160",
      rules:[{
        required:"false",
        message:"请输入旧卡号/订单号(录入200xxxxxxx共计十位卡号)",
        trigger:"blur"

      },{ validator: rule.cardOrder, trigger: 'blur', message: "卡号不能有空格" },],
      disabled: false
    },{
      width:120,
      label: '替换卡号/商户号',
      prop: 'replaceCardOrder',
      type: 'input'
    }, {
      label: '班次',
      prop: 'classNumber',
      type: 'select',
      dicUrl: '/admin/dict/type/stm_conductor_shift',
      rules: [{
        required: true,
        message: '请选择班次'
      }]
    },{
      label: '票种',
      prop: 'ticketType',
      type: 'select',
      search: true,
      dicUrl: '/support/swpmticketcardtype/dict',
      props: {
        label: 'mainName',
        value: 'mainEnName'
      },
      cascaderItem: ["ticketName"],
      rules: [{
        required: true,
        message: '请选择票种',
        trigger: 'blur'
      }],
      disabled: true
    }, {
      label: '车票名称',
      prop: 'ticketName',
      props: {
        label: 'subName',
        value: 'subEnName'
      },
      type: 'select',
      dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
      dicFlag: false,
      component: 'ticket-name-select',
      params: {
        ticketAmountKey: 'amount',
        ticketCountKey: 'estimatedNumber'
      },
      rules: [{
        required: true,
        message: '请选择车票名称',
        trigger: 'blur'
      }]
    },  {
      "type": "number",
      "label": "金额",
      "prop": "amount",
      "precision": 2,
      step:0,
      formatter: (row,value,label,column) => {
        // return numberFormat(value, column.precision)
        return `${row.amount==null?'':row.amount}`
     },
     disabled: true,
    },{
      label: '替换票种',
      prop: 'replaceTicketType',
      type: 'select',
      cascaderItem: ["replaceTicketName"],
      dicUrl: '/support/swpmticketcardtype/dict',
      props: {
        label: 'mainName',
        value: 'mainEnName'
      },
      rules: [{
        required: true,
        message: '请选择替换票种',
        trigger: 'blur'
      }],
      cell: true
    },{
      width:120,
      label: '替换车票名称',
      prop: 'replaceTicketName',
      type: 'select',
      props: {
        label: 'subName',
        value: 'subEnName'
      },
      dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
      dicFlag: false,
      cell: true,
      rules: [{
        required: true,
        message: '请选择替换车票名称',
        trigger: 'blur'
      }]
    },	  {
      "type": "number",
      "label": "预估次数",
      "prop": "estimatedNumber",
      viewDisplay: true,
      editDisplay: true,
      //disabled: true
      // rules:[{
      //   required:true,
      //   message:"请输入预估次数",
      //   trigger:'blur'
      // }]
    },{
      width:120,
      "type": "number",
      label: '新发票卡有效期',
      prop: 'activeTime',
      viewDisplay: true,
      editDisplay: false,
      disabled: true
    },	{
      width:120,
      "type": "number",
      label: '新票卡次数',
      prop: 'ticketTimes',
      viewDisplay: true,
      editDisplay: false,
      disabled: true
    },	  {
      "type": "input",
      "label": "办理人",
      "prop": "handlePersonName",
      component: 'user-select',
      params: {
        userCodeKey: 'handlePersonCode',
        operateNo:'deviceOperateNum',
        belongToStation: true
      },
      search: true,
      rules: [{
        required: true,
        message: '请选择办理人'
      }]
    },	  {
      "type": "input",
      "label": "办理人工号",
      "prop": "handlePersonCode",
      "hide": true,
      disabled: true
    },{
      width:120,
      "type": "select",
      "label": "设备操作号",
      "prop": "deviceOperateNum",
      dicUrl: '/support/swpmdeviceoperationcode/page',
      props: {
          label: "operationCode",
          value: "operationCode",
          res: "data.records"
      },
      filterable: true,
      allowCreate: true,
      dicQuery: {
          size: -1,
          stationCode: store.getters.userInfo.stationCode,
          status: '1'
      },
      rules: [{
        required: true,
        message: '请选择设备操作编号'
      }]
    },	  {
      label: '数据来源',
      prop: 'dataSource',
      dicUrl: '/admin/dict/type/invalid_ticket_data_source',
      editDisplay: false,
      viewDisplay: false,
    },{
      width:120,
      "type": "date",
      "label": "事务发生日期",
      "prop": "handleTime",
      "searchLabelWidth":100,
      "format": "yyyy-MM-dd",
      "valueFormat": "yyyy-MM-dd HH:mm:ss",
      rules: [{
        required: true,
        message: '请选择事务发生日期'
      }]
    },
     {
      type: "date",
      label: "事务发生日期",
      prop: "HandleTimeDTO",
      searchLabelWidth:100,
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      search: true,
      hide: true,
      showColumn: false,
      display: false
    },
    	  {
      "type": "select",
      "label": "状态",
      "prop": "submitStatus",
      "dicUrl": '/admin/dict/type/submit_status',
      "display": false,
      search: true,
      searchValue:'0'
    },	{
      width:120,
      "type": "select",
      "label": "无效票确认状态",
      "prop": "invalidTicketConfirmStatus",
      "dicUrl": '/admin/dict/type/sw_st_invalidticket_confirm_status',
      "display": false,
      search: true,
      searchLabelWidth:"120",
      //hide:true
    },
    // {
    //   "type": "select",
    //   "label": "无效票状态",
    //   "prop": "invalidTicketStatus",
    //   "dicUrl": '/admin/dict/type/sw_st_invalidticket_status',
    //   "display": false,
    //   search: true,
    //   //hide:true
    // }, 
    {
      type: "select",
      label: "确认状态",
      prop: "confirmStatus",
      dicData: [
        {
          label: "未确认",
          value: "0"
        },
        {
          label: "已确认",
          value: "1"
        }
      ],
      hide: true,
      //search: true,
      display: false
    }, 
    //  {
    //   "type": "select",
    //   "label": "确认状态",
    //   "prop": "invalidTicketConfirmStatus",
    //   "dicUrl": '/admin/dict/type/sw_st_invalidticket_confirm_status',
    //   "display": false,
    //   search: true
    // }, 
    {
      width: 120,
      hide: false,
      display: false,
      label: '是否加入报表差错',
      prop: 'isAddReprotError',
      type:'select',
      dicData: [{
        label: '是',
        value: '1'
      },{
        label: '否',
        value: '0'
      }],
    },  
    {
      width:120,
      hide: false,
      label: '报表修改状态',
      prop: 'reportModifyStatus',
      type:'select',
      search: true,
      searchLabelWidth:"100",
       dicData: [{
        label: '修改中',
        value: '1'
      },{
        label: '已完成',
        value: '0'
      }],
      display: false
    },{
      width:120,
      hide: false,
      label: '加入车票上交',
      prop: 'handStatus',
      type:'select',
      search: true,
      searchLabelWidth:"100",
      dicData: [{
        label: '未加入',
        value: '0'
      },{
        label: '已加入',
        value: '1'
      }],
      display: false
    },{
      width:120,
      hide: false,
      label: '加入人工回收',
      prop: 'recoveryStatus',
      type:'select',
      search: true,
      searchLabelWidth:"100",
      dicData: [{
        label: '未加入',
        value: '0'
      },{
        label: '已加入',
        value: '1'
      }],
      display: false
    },{
      "type": "textarea",
      "label": "备注",
      "prop": "remark",
      span: 24
    },     {
      "type": "upload",
      "label": "乘客签名照片",
      "prop": "filePath",
      "hide": true,
      "span": 24,
      listType: 'picture-img',
      component: 'zd-upload'
    },	  {
      "type": "input",
      "label": "部门ID",
      "prop": "deptId",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "创建人ID",
      "prop": "creatorId",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "创建人名称",
      "prop": "creatorName",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "创建时间",
      "prop": "createTime",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "修改时间",
      "prop": "updateTime",
      "hide": true,
      "display": false
    } ]
}

export const tableOptionMerge = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  "viewBtn": true,
  "addBtn": false,
  editBtn: false,
  delBtn: false,
  "selection": true,
  labelWidth: 120,
  submitBtn:false,
  emptyBtn:false,
  "column": [
	  {
      "type": "input",
      "label": "唯一标识",
      "prop": "id",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "线路编码",
      "prop": "lineCode",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "车站编码",
      "prop": "stationCode",
      "hide": true,
      "display": false
    },	  {
      "type": "select",
      "label": "办理类型",
      "prop": "handleType",
      "dicUrl": '/admin/dict/type/work_ticket_handle_type',
    },	  {
      "type": "input",
      "label": "旧卡号/订单号",
      "prop": "cardOrder",
      "search": true,
      disabled: false,
      rules:[{
        required:"false",
        message:"请输入旧卡号/订单号(录入200xxxxxxx共计十位卡号)",
        trigger:"blur"

      }]
    }, {
      label: '班次',
      prop: 'classNumber',
      type: 'select',
      dicUrl: '/admin/dict/type/stm_conductor_shift',
      rules: [{
        required: true,
        message: '请选择班次'
      }]
    },{
      label: '票种',
      prop: 'ticketType',
      type: 'select',
      dicUrl: '/support/swpmticketcardtype/dict',
      props: {
        label: 'mainName',
        value: 'mainEnName'
      },
      cascaderItem: ["ticketName"],
      rules: [{
        required: true,
        message: '请选择票种',
        trigger: 'blur'
      }],
      disabled: true
    }, {
      label: '车票名称',
      prop: 'ticketName',
      props: {
        label: 'subName',
        value: 'subEnName'
      },
      type: 'select',
      dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
      dicFlag: false,
      component: 'ticket-name-select',
      params: {
        ticketAmountKey: 'amount',
        ticketCountKey: 'estimatedNumber'
      },
      rules: [{
        required: true,
        message: '请选择车票名称',
        trigger: 'blur'
      }]
    },	  {
      "type": "number",
      "label": "预估次数",
      "prop": "estimatedNumber",
      viewDisplay: true,
      editDisplay: true
    },  {
      "type": "input",
      "label": "办理人",
      "prop": "handlePersonName",
      rules: [{
        required: true,
        message: '请选择办理人'
      }],
      disabled: true
    },	  {
      "type": "input",
      "label": "办理人工号",
      "prop": "handlePersonCode",
      "hide": true,
      disabled: true
    },{
      "type": "select",
      "label": "设备操作号",
      "prop": "deviceOperateNum",
      dicUrl: '/support/swpmdeviceoperationcode/page',
      props: {
          label: "operationCode",
          value: "operationCode",
          res: "data.records"
      },
      filterable: true,
      allowCreate: true,
      dicQuery: {
          size: -1,
          stationCode: store.getters.userInfo.stationCode,
          status: '1'
      },
      rules: [{
        required: true,
        message: '请选择设备操作编号'
      }],
      disabled: true
    },{
      "type": "date",
      "label": "事务发生日期",
      "prop": "handleTime",
      "format": "yyyy-MM-dd",
      "valueFormat": "yyyy-MM-dd HH:mm:ss",
      rules: [{
        required: true,
        message: '请选择事务发生日期'
      }]
    },{
      "type": "textarea",
      "label": "备注",
      "prop": "remark",
      span: 24
    },     {
      "type": "upload",
      "label": "乘客签名照片",
      "prop": "filePath",
      "hide": true,
      "span": 24,
      listType: 'picture-img',
      component: 'zd-upload'
    },	  {
      "type": "input",
      "label": "创建人ID",
      "prop": "creatorId",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "创建人名称",
      "prop": "creatorName",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "创建时间",
      "prop": "createTime",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "修改时间",
      "prop": "updateTime",
      "hide": true,
      "display": false
    } ]
}
export const tableOptionMergeEdit = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  "viewBtn": true,
  "addBtn": false,
  editBtn: false,
  delBtn: false,
  "selection": true,
  labelWidth: 120,
  submitBtn:false,
  emptyBtn:false,
  "column": [
	  {
      "type": "input",
      "label": "唯一标识",
      "prop": "id",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "线路编码",
      "prop": "lineCode",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "车站编码",
      "prop": "stationCode",
      "hide": true,
      "display": false
    },	  {
      "type": "select",
      "label": "办理类型",
      "prop": "handleType",
      "dicUrl": '/admin/dict/type/work_ticket_handle_type',
    },	  {
      "type": "input",
      "label": "旧卡号/订单号",
      "prop": "cardOrder",
      "search": true,
      disabled: false,
      rules:[{
        required:"false",
        message:"请输入旧卡号/订单号(录入200xxxxxxx共计十位卡号)",
        trigger:"blur"

      }]
    },{
      label: '替换卡号/商户号',
      prop: 'replaceCardOrder',
      type: 'input'
    }, {
      label: '班次',
      prop: 'classNumber',
      type: 'select',
      dicUrl: '/admin/dict/type/stm_conductor_shift',
      rules: [{
        required: true,
        message: '请选择班次'
      }]
    },{
      label: '票种',
      prop: 'ticketType',
      type: 'select',
      dicUrl: '/support/swpmticketcardtype/dict',
      props: {
        label: 'mainName',
        value: 'mainEnName'
      },
      cascaderItem: ["ticketName"],
      rules: [{
        required: true,
        message: '请选择票种',
        trigger: 'blur'
      }],
      disabled: true
    }, {
      label: '车票名称',
      prop: 'ticketName',
      props: {
        label: 'subName',
        value: 'subEnName'
      },
      type: 'select',
      dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
      dicFlag: false,
      component: 'ticket-name-select',
      params: {
        ticketAmountKey: 'amount',
        ticketCountKey: 'estimatedNumber'
      },
      rules: [{
        required: true,
        message: '请选择车票名称',
        trigger: 'blur'
      }]
    },  {
      "type": "number",
      "label": "金额",
      "prop": "amount",
      "precision": 2,
      step:0,
      formatter: (row,value,label,column) => {
        return `${row.amount==null?'':row.amount}`
     },
     disabled: true,
    }, {
      "type": "input",
      "label": "办理人",
      "prop": "handlePersonName",
      rules: [{
        required: true,
        message: '请选择办理人'
      }],
      disabled: true
    },	  	  {
      "type": "input",
      "label": "办理人工号",
      "prop": "handlePersonCode",
      "hide": true,
      disabled: true
    },{
      "type": "select",
      "label": "设备操作号",
      "prop": "deviceOperateNum",
      dicUrl: '/support/swpmdeviceoperationcode/page',
      props: {
          label: "operationCode",
          value: "operationCode",
          res: "data.records"
      },
      filterable: true,
      allowCreate: true,
      dicQuery: {
          size: -1,
          stationCode: store.getters.userInfo.stationCode,
          status: '1'
      },
      rules: [{
        required: true,
        message: '请选择设备操作编号'
      }],
      disabled: true
    },{
      "type": "date",
      "label": "事务发生日期",
      "prop": "handleTime",
      "searchLabelWidth":100,
      "format": "yyyy-MM-dd",
      "valueFormat": "yyyy-MM-dd HH:mm:ss",
      rules: [{
        required: true,
        message: '请选择事务发生日期'
      }]
    },{
      "type": "textarea",
      "label": "备注",
      "prop": "remark",
      span: 24
    },     {
      "type": "upload",
      "label": "乘客签名照片",
      "prop": "filePath",
      "hide": true,
      "span": 24,
      listType: 'picture-img',
      component: 'zd-upload'
    },	  {
      "type": "input",
      "label": "部门ID",
      "prop": "deptId",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "创建人ID",
      "prop": "creatorId",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "创建人名称",
      "prop": "creatorName",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "创建时间",
      "prop": "createTime",
      "hide": true,
      "display": false
    },	  {
      "type": "input",
      "label": "修改时间",
      "prop": "updateTime",
      "hide": true,
      "display": false
    } ]
}
//添加即时退换票
export const tableOptionAdd = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  labelWidth: 120,
  submitBtn: false,
  emptyBtn: false,
  "column": [{
      "type": "select",
      "label": "办理类型",
      "prop": "handleType",
      "dicUrl": '/admin/dict/type/work_ticket_handle_type',
      disabled: true
      // rules: [{
      //   required: true,
      //   message: '请选择办理类型',
      //   trigger:"blur"
      // }]
    },	  {
      "type": "input",
      "label": "旧卡号/订单号",
      "prop": "cardOrder",
      rules:[{
        required:"false",
        message:"请输入旧卡号/订单号(录入200xxxxxxx共计十位卡号)",
        trigger:"blur"

      }]
    },{
      label: '班次',
      prop: 'classNumber',
      type: 'select',
      dicUrl: '/admin/dict/type/stm_conductor_shift',
      rules: [{
        required: true,
        message: '请选择班次'
      }]
    },{
      label: '票种',
      prop: 'ticketType',
      type: 'select',
      search: true,
      dicUrl: '/support/swpmticketcardtype/dict',
      props: {
        label: 'mainName',
        value: 'mainEnName'
      },
      cascaderItem: ["ticketName"],
      rules: [{
        required: true,
        message: '请选择票种',
        trigger: 'blur'
      }],
      disabled: true
    }, {
      label: '车票名称',
      prop: 'ticketName',
      props: {
        label: 'subName',
        value: 'subEnName'
      },
      type: 'select',
      dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
      dicFlag: false,
      component: 'ticket-name-select',
      params: {
        ticketAmountKey: 'amount',
        ticketCountKey: 'estimatedNumber'
      },
      rules: [{
        required: true,
        message: '请选择车票名称',
        trigger: 'blur'
      }]
    },
    {
      "type": "number",
      "label": "金额",
      "prop": "amount",
      "precision": 2,
      step:0,
      formatter: (row,value,label,column) => {
        return `${row.amount==null?'':row.amount}`
     },
     disabled: true
    },	  
    {
      "type": "number",
      "label": "预估次数",
      "prop": "estimatedNumber",
      //disabled: true
    },	  {
      "type": "input",
      "label": "办理人",
      "prop": "handlePersonName",
      component: 'user-select',
      params: {
        userCodeKey: 'handlePersonCode',
        operateNo:'deviceOperateNum',
        belongToStation: true
      },
      rules: [{
        required: true,
        message: '请选择办理人'
      }]
    },	  {
      "type": "input",
      "label": "办理人工号",
      "prop": "handlePersonCode",
      "hide": true,
      disabled: true
    }, {
      "type": "select",
      "label": "设备操作号",
      "prop": "deviceOperateNum",
      dicUrl: '/support/swpmdeviceoperationcode/page',
      props: {
          label: "operationCode",
          value: "operationCode",
          res: "data.records"
      },
      filterable: true,
      allowCreate: true,
      dicQuery: {
          size: -1,
          stationCode: store.getters.userInfo.stationCode,
          status: '1'
      },
      rules: [{
        required: true,
        message: '请选择设备操作编号'
      }]
    },	  {
      "type": "date",
      "label": "事务发生日期",
      "prop": "handleTime",
      "format": "yyyy-MM-dd",
      "valueFormat": "yyyy-MM-dd HH:mm:ss",
      rules: [{
        required: true,
        message: '请选择事务发生日期'
      }]
    },  {
      "type": "textarea",
      "label": "备注",
      "prop": "remark",
      span: 24
    },     {
      "type": "upload",
      "label": "乘客签名照片",
      "prop": "filePath",
      "hide": true,
      "span": 24,
      listType: 'picture-img',
      component: 'zd-upload'
    }]
}

export const timelyTableOption = {
  column: [{
    label: '票种',
    prop: 'ticketType',
    type: 'select',
    cascaderItem: ["ticketName"],
    dicUrl: '/support/swpmticketcardtype/dict',
    props: {
      label: 'mainName',
      value: 'mainEnName'
    },
    rules: [{
      required: true,
      message: '请选择票种',
      trigger: 'blur'
    }],
    cell: true
  },{
    label: '车票名称',
    prop: 'ticketName',
    type: 'select',
    props: {
      label: 'subName',
      value: 'subEnName'
    },
    dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
    dicFlag: false,
    cell: true,
    rules: [{
      required: true,
      message: '请选择车票名称',
      trigger: 'blur'
    }]
  },	 {
    label: '退款原因',
    prop: 'handleType',
    type: 'select',
    dicUrl: '/admin/dict/type/work_ticket_handle_type',
    cell: true
  }, {
    label: '旧卡号/订单号',
    prop: 'cardOrder',
    type: 'input',
    cell: true
  }, {
    label: '替换卡号/商户号',
    prop: 'replaceCardOrder',
    type: 'input',
    cell: true
  },{
    label: '替换票种',
    prop: 'replaceTicketType',
    type: 'select',
    cascaderItem: ["replaceTicketName"],
    dicUrl: '/support/swpmticketcardtype/dict',
    props: {
      label: 'mainName',
      value: 'mainEnName'
    },
    rules: [{
      required: true,
      message: '请选择替换票种',
      trigger: 'blur'
    }],
    cell: true
  },{
    label: '替换车票名称',
    prop: 'replaceTicketName',
    type: 'select',
    props: {
      label: 'subName',
      value: 'subEnName'
    },
    dicUrl: '/support/swpmticketcardtypeparam/dictAll/{{key}}',
    component: 'ticket-name-select',
    params: {
      ticketAmountKey: 'ticketPrice'
    },
    dicFlag: false,
    cell: true,
    rules: [{
      required: true,
      message: '请选择替换车票名称',
      trigger: 'blur'
    }]
  },{
    "type": "number",
    "label": "票价",
    "prop": "ticketPrice",
    "precision": 2,
    step:0,
    formatter: (row,value,label,column) => {
      return `${row.ticketPrice==null?'0.00':row.ticketPrice}`
   },
   hide: true,
   display: false
  }, {
    label: '金额',
    prop: 'amount',
    type: 'number',
    cell: true,
    slot: true
  }]
}

export const timelyFormOption = {
  menuPosition: 'right',
  emptyText: '取消',
  submitIcon: 'el-icon-circle-check',
  emptyIcon: 'el-icon-circle-close',
  labelWidth: 120,
  submitText: '保存',
  column: [{
    type: 'input',
    label: "办理人",
    prop: "handlePersonName",
    component: 'user-select',
    params: {
      userCodeKey: 'handlePersonCode',
      operateNo:'deviceOperateNum',
      belongToStation: true
    },
    rules: [{
      required: true,
      message: '请选择办理人'
    }]
  },{
    "type": "select",
    "label": "设备操作号",
    "prop": "deviceOperateNum",
    dicUrl: '/support/swpmdeviceoperationcode/page',
    props: {
        label: "operationCode",
        value: "operationCode",
        res: "data.records"
    },
    filterable: true,
    allowCreate: true,
    dicQuery: {
        size: -1,
        stationCode: store.getters.userInfo.stationCode,
        status: '1'
    },
    rules: [{
      required: true,
      message: '请选择设备操作编号'
    }]
  }, {
    type: "input",
    label: "办理人工号",
    prop: "handlePersonCode",
    disabled: true
  }, {
    type: "date",
    label: "办理时间",
    prop: "handleTime",
    format: "yyyy-MM-dd",
    valueFormat: "yyyy-MM-dd HH:mm:ss",
    rules: [{
      required: true,
      message: '请选择办理时间'
    }]
  }, {
    label: '班次',
    prop: 'classNumber',
    type: 'select',
    dicUrl: '/admin/dict/type/stm_conductor_shift',
    cell: true,
    rules: [{
      required: true,
      message: '请选择班次'
    }]
  }, 
  // {
  //   label: '合计金额',
  //   prop: 'totalAmount',
  //   type: 'input',
  //   formslot: true
  // }, 
  {
    "type": "textarea",
    "label": "备注",
    "prop": "remark",
    span: 24
  },     {
    "type": "upload",
    "label": "乘客签名照片",
    "prop": "filePath",
    "span": 24,
    listType: 'picture-img',
    component: 'zd-upload'
  }]
}
